package com.erp.util;

import javax.servlet.http.HttpSession;

import com.erp.data.ErpbaseUser;

import flex.messaging.FlexContext;

public class SessionManagerUtil {

	private static HttpSession session = null;
	static {
		session = FlexContext.getHttpRequest().getSession();
	}
	/**
	 * 登录用户信息
	 */
	private static final String LOGIN_USER_INFO = "LOGIN_USER_INFO";

	public static void setLoginUserInfo(ErpbaseUser user) {
		session.setAttribute(LOGIN_USER_INFO, user);
	}

	public static ErpbaseUser getLoginUserInfo() {
		return (ErpbaseUser) session.getAttribute(LOGIN_USER_INFO);
	}
}
